Socket
Socket
Sign inDemoInstall

lodash.union

Package Overview
Dependencies
Maintainers
5
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.union

The modern build of lodash’s `_.union` as a module.


Version published
Weekly downloads
6.5M
increased by6.3%
Maintainers
5
Weekly downloads
 
Created

What is lodash.union?

The lodash.union package is a utility library that provides a method to create an array of unique values, in order, from all given arrays using SameValueZero for equality comparisons.

What are lodash.union's main functionalities?

Union of Arrays

This feature allows you to combine multiple arrays into one array with unique values. The example demonstrates combining two arrays [1, 2, 3] and [2, 3, 4] into a single array [1, 2, 3, 4] without duplicates.

const _ = require('lodash.union');
const array1 = [1, 2, 3];
const array2 = [2, 3, 4];
const unionArray = _.union(array1, array2);
console.log(unionArray); // Output: [1, 2, 3, 4]

Other packages similar to lodash.union

Keywords

FAQs

Package last updated on 25 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc